********************************************************************************
******"Macroprudential Regulation, Quantitative Easing, and Bank Lending"*******
********************************************************************************

********************************************************************************
********************************************************************************
**********************************2019******************************************
********************************************************************************
********************************************************************************
log using $outputdirectory/TABVIIA, replace
log off

clear *
**# Bookmark (input)
use $inputdirectory/INB_extensive2019

gen count=1
bys borrowerid time: gen uniquebtime=sum(count)
bys borrowerid: gen uniqueb=sum(count)
egen multi=sum(count), by(borrowerid time)

log on
**# Bookmark (output - panel a)
sum count 
sum count if uniqueb==1
distinct borrowerid if uniquebtime==1&multi>1
log off


********************************************************************************
********************************************************************************
**********************************2015******************************************
********************************************************************************
********************************************************************************
clear *
**# Bookmark (input)
use $inputdirectory/INB_extensive2015

gen count=1
bys borrowerid time: gen uniquebtime=sum(count)
bys borrowerid: gen uniqueb=sum(count)
egen multi=sum(count), by(borrowerid time)

log on
**# Bookmark (output - panel b)
sum count 
sum count if uniqueb==1
distinct borrowerid if uniquebtime==1&multi>1
log off
log close
